package main

import (
	"encoding/base64"
	"fmt"
	"io/ioutil"
	"log"
	"os"
)

func readBinary(path string) []byte {
	fi, err := os.Open(path)
	if err != nil {
		log.Fatal(err.Error(), "You should specify a path of your image")
	}
	defer fi.Close()
	fd, err := ioutil.ReadAll(fi)
	return fd
}

func do(binary []byte) {
	fmt.Print(base64.StdEncoding.EncodeToString(binary))
}

func main() {

	do(readBinary(os.Args[1]))

}
